import { App } from 'vue';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import * as svg from '@element-plus/icons-vue';

export default function setupElementPlus(app: App) {
  const icons = svg as any;
  for (const i in icons) {
    app.component(`ele-${icons[i].name}`, icons[i]);
  }

  app.use(ElementPlus, {
    locale: zhCn,
  });
}
